-
Notifications
You must be signed in to change notification settings - Fork 22
Decompile Worker #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Decompile Worker #65
Conversation
|
This is something I have tried a few times and got working. However the big issue was always how slow decompling the entire jar is, hopefully I was just being silly as it would be great if this could be done. |
|
I'll try forcing it to decompile the entire Jar first and then time it. |
It's cool, but I think it's unreasonable to make the user wait for 11 minutes for the site to be ready. Especially if we want to be able to link to it from the docs for example. |
|
I imagine it not being enabled by default, and only so for when you want to index the entire Jar, e.g. for full code search, as in #11. |
handle unknown class
modmuss50
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just taken a quick look at this it looks good. There is quite a lot going on here, at some stuff that I need to get familar with. I do worry a little bit that this is going to cause browsers to fall over, where it was previously working just fine.
The requirement of the added headers is also less than ideal, but it seems there is no nice way around that.
package.json
Outdated
| "@katana-project/zip": "^0.7.1", | ||
| "@monaco-editor/react": "^4.7.0", | ||
| "@run-slicer/vf": "^0.3.2-1.11.2", | ||
| "@run-slicer/vf": "git+https://github.com/deirn/vineflower.js.git#7a257563c0352acf232313612146eae82b5919bf", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note before merging, use a proper version.
|
Would it be possible to add some E2E tests for this, or is it too slow? It would be nice to have some confidence that it works on the 3 main browsers. |
|
I say this PR is ready for actual review. Added E2E test for decompiling some classes by stopping as early after one class is decompiled. |
|
Awesome, thanks for that. Ill take a closer look shortly. Do I need to do anything special in cloudflare to add the headers or is that magically handled by the |
|
CF should handle it automatically by the |
|
I think this is looking good, is the fork of VF still required? |
|
Yeah since it uses new API that I added. Still unreleased. I can transfer my fork into FabricMC org if you want. CC: @zlataovce |
|
I seem to be getting an error when running this in chrome dev: Firefox seems fine, as does the e2e test. Am I doing something wrong? |
|
|
I will look into publishing it today |
Hm, not sure, it worked when I tried it, both on Chrome stable and Dev. What if you use the production build?
This PR already accounts for that. |
|
Changed to use official VF release. |

Move the decompiling logic to workers.
Also cache decompiled result to IndexedDB.
TODO:
Related to #11